#pragma once

#include <torch/torch.h>
#include "TileBounds.h"
#include "GSSplat.h"

using namespace torch::autograd;

class CProjectGaussians : public Function<CProjectGaussians> {
public:
    static variable_list forward(AutogradContext* vCtx,
        torch::Tensor vMeans,
        torch::Tensor vScales,
        float vGlobScale,
        torch::Tensor vQuats,
        torch::Tensor vViewMat,
        torch::Tensor vProjMat,
        float vFx,
        float vFy,
        float vCx,
        float vCy,
        int vImgHeight,
        int vImgWidth,
        TileBounds vTileBounds,
        float vClipThresh = 0.01);
    static tensor_list backward(AutogradContext* vCtx, tensor_list vGradOutputs);
};

